import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";
import starsDemo from "../views/demo/stars-demo.vue";
import stars2Demo from "../views/demo/stars-demo2.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/home",
    name: "Home",
    component: Home
  },
  {
    path: "/stars",
    name: "Stars",
    component: starsDemo
  },
  {
    path: "/stars2",
    name: "Stars-2",
    component: stars2Demo
  },
  {
    path: "/mouse",
    name: "MouseDemo",
    component: () => import("@/views/demo/mouse-demo.vue")
  },
  {
    path: "/study",
    name: "Study",
    component: () => import("@/views/demo/study_1.vue")
  },
  {
    path: "",
    redirect: "/home"
  }
];

const router = new VueRouter({
  base: process.env.BASE_URL,
  routes
});

export default router;
